#!/bin/bash
# 一键启动集群
case $1 in
"start" ){
 source /etc/profile;
 /kkb/install/hadoop-3.1.4/sbin/start-dfs.sh
 /kkb/install/hadoop-3.1.4/sbin/start-yarn.sh
 #/kkb/install/hadoop-3.1.4/sbin/mr-jobhistory-daemon.sh start historyserver
 /kkb/install/hadoop-3.1.4/bin/mapred --daemon start historyserver
};;
"stop"){

 /kkb/install/hadoop-3.1.4/sbin/stop-dfs.sh
 /kkb/install/hadoop-3.1.4/sbin/stop-yarn.sh
 #/kkb/install/hadoop-3.1.4/sbin/mr-jobhistory-daemon.sh stop  historyserver
 /kkb/install/hadoop-3.1.4/bin/mapred --daemon stop historyserver
};;
esac